<!DOCTYPE html>
<html>
  <head lang="en">
    <meta charset="UTF-8">
    <title>KLIPSE: a simple and elegant online cljs compiler and evaluator</title>
    <link rel='shortcut icon' type='image/x-icon' href='img/klipse.png' />
    <link rel="stylesheet" type="text/css" href="css/codemirror.css">
  </head>
  <body>

    <pre><code class="reagent">
    [child "Foo Bar"]
    </code></pre>

    <pre><code class="clj">
    (require '[reagent.core :as r])
    </code></pre>

    <pre><code class="clj">(defn child [name]
    [:p "Hi, I am " name])

    (defn childcaller []
    [child "Foo Bar"])
    </code></pre>

    <pre><code class="reagent">
    [child "Foo Bar"]
    </code></pre>

    <pre><code class="reagent">
    (defn foo [txt]
     (throw "You should see this exception")
       [:p "hello " txt])
    [foo "Foo Bar"]
    </code></pre>
    <pre><code class="reagent">
    (defn hello [name]
  [:p (str "Hello " @(atom 1) "!")])
    </code></pre>

    <pre><code class="reagent">
(def c (r/atom 1))

(defn counter []
  [:div
     [:button {:on-click (fn [e] (swap! c inc))} "inc"]
     [:p "Current count: " @c]])
    </code></pre>

    <script>
     window.klipse_settings = {
       selector: '.clj',
	     selector_reagent: '.reagent',
     };
    </script>
    <script src="/cljs-out/dev-main.js"></script>
  </body>
</html>
